Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix state passthrough (banish the shadow realm) #622

Merged
merged 43 commits into from
Jun 7, 2024

Conversation

Alex-Fischman
Copy link
Collaborator

This PR fixes the state edge passthrough performance bug by "tying the knot" so that loop contexts point to the loop itself (instead of to the pre-context version of the loop). To this end, it also:

  • Refactors add_context.rs
  • Refactors the schedule
  • Changes the code that builds the program string in dag_in_context/src/lib.rs
  • Touches almost every test in the dag_in_context subcrate to add the unions to the egglog_test
  • Because we need to create temporary variables in add_context.rs, and because substitution adds context, we have to pass a ContextCache throughout our code.
  • Deletes the empty fuction_inlining.egg file
  • Fixes the redundant switch rewrite rules and moves them to passthrough
  • Improves the debug-helper.egg file
  • Does some other stuff too, like adding two new snapshot tests

dag_in_context/src/add_context.rs Outdated Show resolved Hide resolved
dag_in_context/src/add_context.rs Show resolved Hide resolved
dag_in_context/src/add_context.rs Outdated Show resolved Hide resolved
dag_in_context/src/lib.rs Outdated Show resolved Hide resolved
dag_in_context/src/type_analysis.egg Show resolved Hide resolved
dag_in_context/Cargo.lock Show resolved Hide resolved
dag_in_context/src/add_context.rs Show resolved Hide resolved
@Alex-Fischman Alex-Fischman requested a review from ajpal June 5, 2024 20:56
@ajpal
Copy link
Collaborator

ajpal commented Jun 5, 2024

I'd like to see a solid nightly run before we merge, but code lgtm!

@Alex-Fischman
Copy link
Collaborator Author

I just looked at eggcc-notify and the nightly for main has been failing since May 31st. Since I rebased my branch is also failing. I don't know why.

@Alex-Fischman
Copy link
Collaborator Author

Rebased on fix-install (#623).

@Alex-Fischman Alex-Fischman merged commit 2051557 into main Jun 7, 2024
4 checks passed
@Alex-Fischman Alex-Fischman deleted the fix-state-passthrough branch June 7, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants